#define _CRT_SECURE_NO_WARNINGS 1
#include"DList.h"
void Test()
{
	ListNode* list = ListCreate();
	/*ListPushFront(list, 1);
	ListPushFront(list, 2);
	ListPushFront(list, 3);
	ListPushFront(list, 4);
	ListPushFront(list, 5);*/
	ListPushBack(list, 1);
	ListPushBack(list, 2);
	ListPushBack(list, 3);
	ListPushBack(list, 4);
	ListPushBack(list, 5);
	ListPrint(list);
}
void TestPop()
{
	ListNode* list = ListCreate();
	ListPushBack(list, 1);
	ListPushBack(list, 2);
	ListPushBack(list, 3);
	ListPushBack(list, 4);
	ListPushBack(list, 5);
	ListPrint(list);

	/*ListPopBack(list);
	ListPopBack(list);
	ListPopBack(list);
	ListPopBack(list);
	ListPopBack(list);
	ListPopBack(list);*/
	ListPopFront(list);
	ListPopFront(list);
	ListPopFront(list);
	ListPopFront(list);
	ListPopFront(list);
	ListPopFront(list);
	ListPrint(list);
}
void test1()
{
	ListNode* list = ListCreate();
	ListPushBack(list, 1);
	ListPushBack(list, 2);
	ListPushBack(list, 3);
	ListPushBack(list, 4);
	ListPushBack(list, 5);
	ListPushBack(list, 6);
	ListPushBack(list, 7);
	ListPrint(list);

	ListNode* find = ListFind(list, 1);
	/*if (find)
	{
		find->_data = 44;
	}*/
	//ListInsert(find, 66);
	ListErase(find);
	ListPrint(list);
}
int main()
{
	//Test();
	//TestPop();
	test1();
	return 0;
}